package org.zoomdev.zoom.dao.adapters.parameter;

import org.zoomdev.zoom.dao.adapters.ParameterAdapter;

import java.sql.PreparedStatement;
import java.sql.SQLException;

// 字符适配器
public class CharParameterAdapter implements ParameterAdapter<String> {

    @Override
    public void setNonnullParameter(PreparedStatement ps, int index, String data) throws SQLException {
        // 处理字符类型，转换为单字符字符串
        ps.setString(index, String.valueOf(data));
    }
}
